<!--- SUI模板 on 2017/3/30 -->
<script ng-init="initCss('hello-page/order.css');setTitle('工单列表');init();nextTasks();"></script>
<div class="page">
    <nav class="bar bar-tab">
        <a ng-if="user.userRole=='customer'||user.userRole=='customer_special'||user.userRole=='sales_manager'"
           class="tab-item external" href="#order">
            <span class="icon icon-home"></span>
            <span class="tab-label">工单</span>
        </a>
        <a ng-if="user.userRole=='worker'" class="tab-item active external" href="#task">
            <span class="icon icon-home"></span>
            <span class="tab-label">任务</span>
        </a>
        <a ng-if="user.userRole=='driver'" class="tab-item external" href="#departure">
            <span class="icon icon-home"></span>
            <span class="tab-label">派车单</span>
        </a>
        <a class="tab-item external" href="#hello">
            <span class="icon icon-me"></span>
            <span class="tab-label">我</span>
        </a>
    </nav>
    <div class="content pull-to-refresh-content" ng-init="">
        <div class="pull-to-refresh-layer my">
            <div class="preloader"></div>
            <div class="pull-to-refresh-arrow"></div>
        </div>
        <div class="content-block-title">您小组分派到的任务流程</div>
        <div class="list-block">
            <ul>
                <li class="item-content item-link"
                    ng-repeat="task in tasks track by task.taskAssignmentId"
                    ng-click="openTaskDetail(task)">
                    <div class="item-media"><i class="icon icon-f7"></i></div>
                    <div class="item-inner">
                        <div class="item-title">{{task.taskNo}}</div>
                        <div class="item-after">{{task|getTaskStatus}}</div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
    <div class="popup popup-detail">
        <nav class="bar bar-tab bar-popup">
            <a ng-if="user.userRole=='worker'" class="tab-item external msg-change"
               ng-click="finishTask(selectTask)" href="javascript:;">
                <span class="tab-label">完成任务</span>
            </a>
            <a class="close-popup tab-item external" href="javascript:;">
                <span class="tab-label">返回</span>
            </a>
        </nav>
        <div class="content-inner-box">
            <div class="content-block" ng-if="selectTask">
                <p>流程详情</p>
                <p>流程id：{{selectTask.taskNo}}</p>
                <p>流程名：{{selectTask.taskProcess.processName}}</p>
                <p>客户：{{selectTask.customer.userRealName}}</p>
                <p>流程状态：{{selectTask|getTaskStatus}}</p>
            </div>
        </div>
    </div>
</div>
<div ng-init="suiMobileInit()"></div>